# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=libcotp
pkgver=1.2.6
pkgrel=0
pkgdesc="Library for generating TOTP and HOTP"
url="https://github.com/paolostivanin/libcotp"
license="Apache-2.0"
arch="all"
makedepends="cmake libgcrypt-dev libbaseencode-dev"
subpackages="$pkgname-dev"
source="https://github.com/paolostivanin/libcotp/archive/v$pkgver/libcotp-$pkgver.tar.gz"
options="!check" # needs criterion

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
4feda16035aae63aaff3c66c12d69bcd227cc40cafc551fe97dbcc36e338b0d6e2b80d97716946b24a526077e9ab90ad75c29f010ddee7c448668e80721b5f61  libcotp-1.2.6.tar.gz
"
